<html>
<head><meta charset="utf-8"><title>multiple dependency versions workspace · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/multiple.20dependency.20versions.20workspace.html">multiple dependency versions workspace</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211413030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/multiple%20dependency%20versions%20workspace/near/211413030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> conner <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/multiple.20dependency.20versions.20workspace.html#211413030">(Sep 27 2020 at 11:57)</a>:</h4>
<p>is it possible to have multiple dependency versions (in particular, the same dependency but different features) in a workspace for two independent / leaf nodes? it seems like no, but i'm hoping there's a workaround. in particular, i need some tokio features disabled for a crate intended for wasm but then some tokio features enabled for a crate that's used as a build-time tool</p>



<a name="211413216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/multiple%20dependency%20versions%20workspace/near/211413216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/multiple.20dependency.20versions.20workspace.html#211413216">(Sep 27 2020 at 12:00)</a>:</h4>
<p><a href="https://github.com/rust-lang/cargo/issues/7914">https://github.com/rust-lang/cargo/issues/7914</a></p>
<blockquote>
<p><code>-Z features=itarget</code> causes the feature resolver to ignore features for target-specific dependencies for targets that don't match the current compile target.</p>
</blockquote>



<a name="211413218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/multiple%20dependency%20versions%20workspace/near/211413218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/multiple.20dependency.20versions.20workspace.html#211413218">(Sep 27 2020 at 12:00)</a>:</h4>
<p>I think that will help.</p>



<a name="211413243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/multiple%20dependency%20versions%20workspace/near/211413243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> conner <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/multiple.20dependency.20versions.20workspace.html#211413243">(Sep 27 2020 at 12:01)</a>:</h4>
<p>ah thank you! i'll give that a try</p>



<a name="211413877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/multiple%20dependency%20versions%20workspace/near/211413877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> conner <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/multiple.20dependency.20versions.20workspace.html#211413877">(Sep 27 2020 at 12:18)</a>:</h4>
<p>for future reference, i ended up needing <code>-Zfeatures=itarget,build_dep</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>